x11: Redo choice between EGL and GLX
authorBenjamin Otte <otte@redhat.com>
Fri, 2 Jul 2021 01:37:32 +0000 (03:37 +0200)
committerBenjamin Otte <otte@redhat.com>
Thu, 22 Jul 2021 14:23:56 +0000 (16:23 +0200)
commit5a3b4de1b73a948605c857c77ef2ae088150fd1e
treebdde6645607bc72cfb5179fafbe24546e9c71a03
parent74288eceaf3cdbd7dc4735c1b383f9da7dc5c68c
x11: Redo choice between EGL and GLX

We try EGL first, but are very picky about what we accept.
If that fails, we try to go with GLX instead.
And if that also fails, we try EGL again, but this time accept anything.

The idea here is that EGL is the preferred method going forward, but GLX is
the tried and tested method that we know works. So if we detect issues with
EGL, we want to avoid using it in favor of GLX.

Also add a GDK_DEBUG=gl-egl option to force EGL at all costs and not try
GLX.
gdk/gdk.c
gdk/gdkdebug.h
gdk/x11/gdkglcontext-egl.c
gdk/x11/gdkglcontext-x11.c
gdk/x11/gdkglcontext-x11.h